This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: Script for Setting & Resetting the Default Printer ~Keiko Preponeterader 28.Jul.03 08:03 PM a Web browser Applications Development All ReleasesWindows 2000, Windows XP
This is only going to work if you are printing from LotusScript. LotusScript always prints to the default printer, but the Notes UI will remember the last printer set through the UI regardless of changes to the default printer.
That is to say, if you have three printers (A, B, and C). Printer A is normally the default. In Notes you use file->print to print a mail memo and select printer B. Printer A remains the Windows default printer, but the next time you go back to file->print printer B remains selected. If at this point you print from the print smart-icon or a button with a formula @command([fileprint]) behind it the output will go to printer B, but if you print from LotusScript the output will go to Printer A.
If you use this script and select printer C, the script will reset the Windows default printer to C, at which point anything coded to print where I have put
'*****************************************
' Print what you need to print here
'*****************************************
will go to printer C, after which Printer A will be reset to be the default printer again, but printer B will *still* be the last printer selected in the UI and still show as the *application* defaut when you select file->print.
In summary, there are two things going on, the *application* default printer and the *Windows* default printer. The Notes UI and formula language are going to talk to the application default printer, LotusScript is going to talk to the Windows default printer.